import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import './assets/main.css'
import 'normalize.css'
const app = createApp(App)

app.use(store)
app.use(router)

// 定义一个全局自定义组件，用于按钮级别的权限
app.directive('btnDirective', (el, binding) => {
    // 获取组件的权限,根据权限设置按钮是否禁用

    if (binding.value == 2) {
        // 说明是超级管理员
        el.style.display = 'block'
    } else {
        // el.disabled = true
        el.style.display = 'none'
    }
})


app.mount('#app')